from PIL import Image
import numpy as np
from BBE import BBE
im=Image.open('lena.png')
im=np.asarray(im)
r,c=im.shape
s=8
embededImg,capacity=BBE(im,s)
if capacity>0:
    print('block size = {s1} X {s}'.format(s1=s,s=s))
    print('ER = {} bpp'.format(capacity/(np.dot(r*c))))
    temp=Image.fromarray(embededImg)
    temp.show()
else:
    print('Cannot embed any data!')